home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / dopus511.lha / dopus_pch.lha / ARexx.lha / Arexx / CDO.dopus5 next >
Text File  |  1995-05-14  |  976b  |  26 lines

  1. /* CDO v1.01 [13-May-1995] for Directory Opus 5
  2.    By Leo Davidson ("Nudel", P0T-NOoDLE/Gods'Gift Utilities)
  3.  
  4.    Note: Please don't confuse this with the OCD script!
  5.  
  6.    When run from a Shell, will echo the path used by the SOURCE Lister.
  7.    Using an alias, this can be used as a command which CD's to the path
  8.    used by the SOURCE lister.
  9.  
  10.    To set up the command "CDO", add the following to your s:shell-startup:
  11. -------------------------------------------------------------------------------
  12. Alias CDO "CD *"*`rx DOpus5:ARexx/cdo.dopus5*`*""
  13. -------------------------------------------------------------------------------
  14. */
  15. signal on error                /* if "lister query..." fails, exit */
  16. options results
  17. address "DOPUS.1"            /* Assumes there's only one copy. */
  18.  
  19. lister query source            /* Get handle of 1st SOURCE lister. */
  20. Ls_Handle = Word(RESULT,1)
  21.  
  22. Lister Query Ls_Handle Path        /* Get its path. */
  23. Say Strip(RESULT,B,'"')            /* Echo result -> input of CD cmd. */
  24. Error:
  25. EXIT
  26.